<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta http-equiv="cache-control" content="max-age=0" />
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-Control" content="no-cache, must-revalidate">
    <meta http-equiv="expires" content="0">
    <link rel="manifest" href="./manifest.json" />
    <title>PWA</title>

    <style>
        /* 可以设置 web 应用的显示模式 */
        /* @media all and (display-mode: fullscreen) {
           display-mode: fullscreen|standalone |minimal-ui|browser 
        } */
        .pwa {
            max-width: 1000px;
            margin: auto;
            text-align: center;
        }

        .pwa button {
            min-width: 260px;
            text-align: center;
            font-size: 16px;
            background-color: #2d8cf0;
            margin: 15px;
            padding: 12px 20px;
            border: 0;
            color: #fff;
            cursor: pointer;
            border-radius: 3px;
        }
    </style>
</head>

<body>
    <div class="pwa">
        <div>
            <button id='add-home'>自定义添加主屏</button>
        </div>
        <div>
            <button id='notify'>提醒</button>
        </div>
        <div>
            <button id='sync'>后台Sync</button>
        </div>
        <div>
            <button id='update'>更新SW</button>
        </div>
        <div>
            <button id='updateCache'>更新缓存</button>
        </div>
        <div>
            <button id='push'>推送</button>
        </div>

        <div>
            Logs
            <div id="log"> </div>
        </div>
    </div>
    <script type="module">
        import register from './register.js';
        register('./service-worker.js',{scope:'/'});
    </script>
</body>

</html>